<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册与登录页面</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            background-color: #f0f0f0;
        }

        h2 {
            margin-bottom: 20px;
        }

        form {
            margin-bottom: 20px;
        }



        button {
            padding: 10px 20px;
            cursor: pointer;
        }

        button:hover {
            background-color: #45a049;
        }

        .error {
            color: red;
            font-size: 0.9em;
        }
    </style>
</head>

<body>
    <div id="register">
        <h2>注册页面</h2>
        <form id="registerForm">
            <label for="realName">真实姓名：</label>
            <input type="text" id="realName" name="realName" required>
            <span class="error" id="realNameError"></span>
            <br>

            <label for="password">你的密码：</label>
            <input type="password" id="password" name="password" required>
            <span class="error" id="passwordError"></span>
            <br>

            <label for="confirmPassword">确认密码：</label>
            <input type="password" id="confirmPassword" name="confirmPassword" required>
            <span class="error" id="confirmPasswordError"></span>
            <br>

            <label for="mobile">手机号码：</label>
            <input type="text" id="mobile" name="mobile" required>
            <span class="error" id="mobileError"></span>
            <br>

            <label for="tel">固定电话：</label>
            <input type="text" id="tel" name="tel" required>
            <span class="error" id="telError"></span>
            <br>

            <button type="submit">注册</button>
        </form>
    </div>

    <div id="login" style="display: none;">
        <h2>登录页面</h2>
        <form id="loginForm">
            <label for="loginName">真实姓名：</label>
            <input type="text" id="loginName" name="loginName" required>
            <br>

            <label for="loginPassword">密码：</label>
            <input type="password" id="loginPassword" name="loginPassword" required>
            <br>

            <button type="submit">登录</button>
        </form>
        <div id="loginMessage"></div>
    </div>

    <script src="script.js"></script>
</body>

</html>